#coding=utf-8
AD = '''
<embed src="http://a.alimama.cn/widget/yr1/yr1fixed_950_90.swf" 
flashvars="catid=999900001&count=20&sz=15&type=1&i=mm_12837376_0_0" 
width="1280" height="90" quality="high" wmode="transparent" bgcolor="#ffffff" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" 
pluginspage="http://www.macromedia.com/go/getflashplayer" />
'''

def insert_ad(content):
  n = content.lower().find('<body')
  if n == -1:
    return content
  #n = n + len(DELIMITER)
  return content[:n] + '\n%s\n'%AD + content[n:]
